<template>
	<view class="result" style="width: 100%;height: 100%;" v-if="video_url">
		<video :src="video_url" mode="aspectFill" class="imuban" autoplay="true" loop="true" show-fullscreen-btn="false"
			enable-progress-gesture="false" show-mute-btn="true" play-btn-position="center" id="myVideo2"></video>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				video_url: null,
				loadding: false
			}
		},
		onLoad(options) {
			this.video_url = options.video_url
		},
		onShow() {
			// 页面显示时触发，继续播放视频
			const videoContext = uni.createVideoContext('myVideo2', this);
			videoContext.play();
		},
		onHide() {
			// 页面隐藏时触发，暂停视频播放
			const videoContext = uni.createVideoContext('myVideo2', this);
			videoContext.pause();
		},
		methods: {

		}
	}
</script>

<style>
	page {
		width: 100%;
		height: 100vh;
	}

	.imuban {
		width: 100%;
		height: 100%;
	}
</style>